1. Field of the Invention
Embodiments of the invention relate to improving the efficiency of multi-node computing systems. More specifically, embodiments of the invention may reduce the overhead caused by performing two-phase commits in a multi-node computing system.
2. Description of the Related Art
An atomic operation may refer to a set of interdependent transactions that can be combined so that they appear to the rest of the system to be a single operation. Atomicity in a computing system is frequently required to guarantee that a series of interdependent transactions are either all performed successfully or all canceled successfully. That is, an atomic transaction either occurs completely, or not at all, but should never occur in part.
For example, in a consumer banking application, an account holder may wish to transfer $500 from his or her savings account to his or her checking account. This transaction actually involves a pair of operations. The first operation is to remove (or debit) $500 from the savings account. The second operation is to add (or credit) $500 to the checking account. Both the bank and the account holder want to ensure that if the bank's computer system crashed in the middle of this transfer, there is a way to make sure that either the $500 is posted to the checking account, or, alternatively, that the $500 is not removed from the savings account. It is unacceptable if the funds are removed from savings, but are not credited to checking. In other words, this transaction requires a mechanism to guarantee “atomicity.”
In systems where a single participant (i.e., a single computing entity such as a database) is involved in performing a series of transactions, a one-phase commit protocol can be used to achieve atomicity. In this case, the single participant performs each transaction in the series. The participant is said to “commit” the transaction if all the steps are completed successfully. On the other hand, if some of the transactions fail, e.g., should the computing system “crash” in the middle of performing the steps, the participant performs a “rollback,” where any of the steps that were performed are undone.
In other cases, however, multiple participants may be involved in performing a series of steps related to an atomic transaction. For example, the steps may span a plurality of computing nodes in a multi-node computing environment. A two-phase commit protocol may be used to perform an atomic transaction in a these types of distributed computing environments.